cmake_minimum_required(VERSION 3.1)

project(debtest LANGUAGES CXX)

# Standard install paths
include(GNUInstallDirs)

# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# Instruct CMake to run moc/rcc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

find_package(PkgConfig REQUIRED)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Qml REQUIRED)
find_package(Qt5Quick REQUIRED)
find_package(Qt5Test REQUIRED)
find_package(Qt5DBus REQUIRED)
find_package(Qt5Concurrent REQUIRED)

set(CMAKE_INSTALL_PREFIX /usr)
set(INSTALLER_DIR ${CMAKE_INSTALL_DATADIR}/debtest)

add_subdirectory(src)

install(FILES debtest.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
install(FILES debtest.svg DESTINATION ${INSTALLER_DIR})
